package server

import (
	"time"
	"tsugi/conf"
	"tsugi/mqs/rabbitmq"
)

func StartHeartBeat() {
	con := conf.StorageRoot()
	mq := rabbitmq.New(con.Server.RabbitServer)
	defer mq.Close()
	for {
		mq.Publish("apiServer", con.Server.Listen)
		time.Sleep(time.Second * 5)
	}
}
